import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { RequestService } from './request.service';

@Injectable()
export class UserControlApiService {

  constructor(
    private request: RequestService,
  ) { }

  public login(userInfo): Observable<{token: string, tokenHead: string}> {
    return this.request.post('/admin/login', userInfo)
  }

  public regist(userInfo): Observable<number> {
    return this.request.post('/admin/register', userInfo)
  }
}
